import Vue from 'vue'
import Router from 'vue-router'
import Main from '../components/Main';
import DispBar from "../components/DispBar";
import DispMap from "../components/DispMap";
import Config from "../components/Config";

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/main',
      name: 'Main',
      component: Main,
      redirect:"/main/bar",
      children: [
        {
          path: 'map',
          name: 'DispMap',
          component: DispMap,
        },
        {
          path: 'bar',
          name: 'DispBar',
          component: DispBar
        }
      ]
    },
    {
      path: "/config",
      name: "Config",
      component: Config
    }
  ]
})
